package com.whoimi.admin.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author whoimi
 * @since 2025-07-25T17:36:33.810505700
 */

@Table(name = "sys_menu", schema = "wiic_admin")
public class Menu implements Serializable {

    @Serial
    private static final long serialVersionUID = 3668073811922701749L;

    /**
     * ID
     */
    @Id
    @Column("id")
    private Long id;

    /**
     * 父菜单ID
     */
    @Column("parent_id")
    private Long parentId;

    /**
     * 父节点ID路径
     */
    @Column("tree_path")
    private String treePath;

    /**
     * 菜单名称
     */
    @Column("name")
    private String name;

    /**
     * 菜单类型（1-菜单 2-目录 3-外链 4-按钮）
     */
    @Column("type")
    private Integer type;

    /**
     * 路由名称（Vue Router 中用于命名路由）
     */
    @Column("route_name")
    private String routeName;

    /**
     * 路由路径（Vue Router 中定义的 URL 路径）
     */
    @Column("route_path")
    private String routePath;

    /**
     * 组件路径（组件页面完整路径，相对于 src/views/，缺省后缀 .vue）
     */
    @Column("component")
    private String component;

    /**
     * 【按钮】权限标识
     */
    @Column("perm")
    private String perm;

    /**
     * 【目录】只有一个子路由是否始终显示（1-是 0-否）
     */
    @Column("always_show")
    private Boolean alwaysShow;

    /**
     * 【菜单】是否开启页面缓存（1-是 0-否）
     */
    @Column("keep_alive")
    private Boolean keepAlive;

    /**
     * 显示状态（1-显示 0-隐藏）
     */
    @Column("visible")
    private Boolean visible;

    /**
     * 排序
     */
    @Column("sort")
    private Integer sort;

    /**
     * 菜单图标
     */
    @Column("icon")
    private String icon;

    /**
     * 跳转路径
     */
    @Column("redirect")
    private String redirect;

    /**
     * 创建时间
     */
    @Column("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Column("update_time")
    private LocalDateTime updateTime;

    /**
     * 路由参数
     */
    @Column("params")
    private String params;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getParentId() {
        return this.parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getTreePath() {
        return this.treePath;
    }

    public void setTreePath(String treePath) {
        this.treePath = treePath;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return this.type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getRouteName() {
        return this.routeName;
    }

    public void setRouteName(String routeName) {
        this.routeName = routeName;
    }

    public String getRoutePath() {
        return this.routePath;
    }

    public void setRoutePath(String routePath) {
        this.routePath = routePath;
    }

    public String getComponent() {
        return this.component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getPerm() {
        return this.perm;
    }

    public void setPerm(String perm) {
        this.perm = perm;
    }

    public Boolean getAlwaysShow() {
        return this.alwaysShow;
    }

    public void setAlwaysShow(Boolean alwaysShow) {
        this.alwaysShow = alwaysShow;
    }

    public Boolean getKeepAlive() {
        return this.keepAlive;
    }

    public void setKeepAlive(Boolean keepAlive) {
        this.keepAlive = keepAlive;
    }

    public Boolean getVisible() {
        return this.visible;
    }

    public void setVisible(Boolean visible) {
        this.visible = visible;
    }

    public Integer getSort() {
        return this.sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getIcon() {
        return this.icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getRedirect() {
        return this.redirect;
    }

    public void setRedirect(String redirect) {
        this.redirect = redirect;
    }

    public LocalDateTime getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getParams() {
        return this.params;
    }

    public void setParams(String params) {
        this.params = params;
    }

}
